<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
     <meta name="keywords" content="{$_C['site_keyword']}">
	<meta name="description" content="{$_C['site_des']}">
	<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/login.css">
	<title>{$_C['site_name']}</title>
</head>
	<body>
		<div class="login-panel">
			<div class="login-panel-header">
				<img src="{$_C.hy_path}images/login_logo.jpg" width="350" alt="login logo" class="login-logo">
			</div>
			<div class="login-panel-body">
				<div class="login-form">
					<form method="post" action="index.php?g=home&m=user&a=act_login">
						<div class="form-block">
							<label class="large-label">用户名：</label>
							<div class="form-input-group username">
								<input type="text" id="usernanme" name="username" class="form-input" required />
							</div>
						</div>
						<div class="form-block">
							<label class="large-label">密<span class="ws"></span>码：</label>
							<div class="form-input-group password">
								<input name="password" id="password" type="password" class="form-input" required />
							</div>
						</div>
						<div class="form-block remember-me">
							<label>
								<input type="checkbox"/>
								记住登录信息
							</label>
						</div>
						<div class="btns">
							<a style="display:inline-block" href="javascript:;" class="login-btn"><span class="sr-only">登录</span></a>
							<a style="display:inline-block" href="index.php" class="cancel-btn"><span class="sr-only">返回</span></a>
						</div>
					</form>
				</div>
			</div>
			<div class="login-panel-footer"></div>
		</div>
	</body>
    
    <script>
	
	
	$('.login-btn').click(function(e){ 
      e.preventDefault();	
	  var username=$('#usernanme').val();
    var pwd=$('#password').val();

		$.post('/index.php?g=home&m=user&a=act_login',{
			"{$input['pwd']}":pwd,
			"{$input['account']}":username
			},function(result)
	{ 
	if(result.error==0)
	{
		
		if(result.url)
		{
		window.location.href=result.url;
		}
		else
		{
			window.location.href='index.html';
		}
	}
	else{
		alert(result.content);
	}
		},'json');
		
		})
	
	
    </script>
</html>
